package com.yazdankhah.application;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

public class Const {

  /** Holds the number of verses in Quran. */
  //public static final int VERSE_NUM = 6236;
  public static final int VERSE_NUM = 50;
  
  /** Holds the delimeter of chapter, verse, and text of a Verse. */
  public static final String DELEMETER = "[|]";
  
  /** Holds the Quran's file home. */
  public static final String QURAN_HOME = "/resources/text/quran/";

  /** Holds the log file home. */
  public static final String LOG_HOME = "/resources/log/";

  /** Holds the Quran's file name. */
  public static final String QURAN_FILE_NAME = "quran.txt";

  /** Holds the Quran's translation path. */
  public static final String TRANSLATIONS_HOME = "/resources/text/translation/";

  /**
   * Holds the inquiry types list.
   */
  public static final List<SelectItem> inquiryTypes = new ArrayList<>();

  
  /**
   * Holds the type code.
   */
  public static final String TXN_TYP_CD = "C";

  /**
   * Holds the application version ID. The leading zero is necessary!
   */
  public static final String APP_VERSION_ID = "09";


//  /** Holds this year as a String. */
//  public static String THIS_YEAR;

  static { //populate drop-down lists
    inquiryTypes.add(new SelectItem(InquiryType.FAMILY_CODE, InquiryType.FAMILY_DESCR));
    inquiryTypes.add(new SelectItem(InquiryType.SPONSOR_CODE, InquiryType.SPONSOR_DESCR));
    inquiryTypes.add(new SelectItem(InquiryType.DEPENDENT_CODE, InquiryType.DEPENDENT_DESCR));
    inquiryTypes.add(new SelectItem(InquiryType.PERSON_CODE, InquiryType.PERSON_DESCR));

    /*.....................................................................................*/

  } //static-block

  public static final class Tabs {

    public static final String INP_FORM = "inpForm";

    public static final String INP_TR = "inpTR";

  } //inner-class

  public static final class DateFormats {

    public static final String DISPLAY = "yyyy-MM-dd";

    public static final String INTERNAL_DATE = "yyyyMMdd";

    public static final String YEAR = "yyyy";

    public static final String INTERNAL_TIME = "HHmmss";

    public static final DateFormat DISPLAY_DATE_FORMAT = new SimpleDateFormat(DISPLAY);

    public static final DateFormat DISPLAY_YEAR_FORMAT = new SimpleDateFormat(YEAR);

    public static final DateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat(INTERNAL_DATE);

    public static final DateFormat SIMPLE_TIME_FORMAT = new SimpleDateFormat(INTERNAL_TIME);

  } //inner-class

  public static final class Labels {

    public static final String SUBMIT_BTN = "Submit";

    public static final String SEARCH_PAGE_TITLE = "Claims Coverage Eligibility Agent (CCEA)";

    public static final String RESPONSE_PAGE_TITLE = "CCEA Response";

  } //inner-class

  public static final class InquiryType {

    public static final String FAMILY_CODE = "family";

    public static final String FAMILY_DESCR = "Family";

    public static final String SPONSOR_CODE = "sponsor";

    public static final String SPONSOR_DESCR = "Sponsor";

    public static final String DEPENDENT_CODE = "dependent";

    public static final String DEPENDENT_DESCR = "Dependent";

    public static final String PERSON_CODE = "person";

    public static final String PERSON_DESCR = "Person";

  } //inner-class

  public static final class URLs {

    public static final String RESPONSE_CLEAN = "/responseClean.jsf";

    public static final String RESPONSE_PARTIAL_MATCH = "/responsePartialMatch.jsf";

    public static final String RESPONSE_WARNING = "/responseWarning.jsf";

    public static final String RESPONSE_ERROR = "/responseError.jsf";

    public static final String KB_RESPONSE_CLEAN = "/kbResponseClean.jsf";

    public static final String KB_RESPONSE_PARTIAL_MATCH = "/kbResponsePartialMatch.jsf";

    public static final String KB_RESPONSE_WARNING = "/responseWarning.jsf";

    public static final String KB_RESPONSE_ERROR = "/responseError.jsf";

    public static final String COMPARE_RESPONSE_CLEAN = "/compResponseClean.jsf";

    public static final String COMPARE_RESPONSE_PARTIAL_MATCH = "/compResponsePartialMatch.jsf";

    public static final String COMPARE_RESPONSE_WARNING = "/compResponseWarning.jsf";

    public static final String COMPARE_RESPONSE_ERROR = "/compResponseError.jsf";

    public static final String COMPARE_REQUEST = "/compRequest.jsf";

    public static final String REQUEST = "/request.jsf";

    public static final String REQUEST_VALID = "/requestValid.jsf";

  } //inner-class

  public static final class ContextKeys {

    public static final String APP_NAME = "app.name";

    public static final String APP_VERSION = "app.version";

    public static final String APP_ID = "app.id";

    public static final String APP_PROPERTIES = "app.properties";

    public static final String LOGOFF_URL = "logoff.url";

    public static final String PROJPROPS_PATH = "projprops.path";

    public static final String APPSERVER_INSTANCE_REGION = "appserver.instance.region";

    public static final String SECURITY_PORT = "security.port";

    public static final String DMDC_REGION = "dmdcRegion";

    //public static final String USER_KEY = AuthAgentConstants.ATT_USER_KEY;

    public static final String CCEA_SERVICE_URL = "temp.internal.service.ccea";

    public static final String CCEA_SERVLET_NAME = "/TRServlet";

    //public static final String LOG4J_PROPERTIES  = "log4j.properties";
    //public static final String RUN_IN_PROPER_REGION = "RUN_IN_PROPER_REGION";
  } //inner-class

} //class

